class Solution:
    def leastMinutes(self, n: int) -> int:
        ans = 1
        now = 1
        while now < n:
            now *= 2
            ans += 1
        return ans


if __name__ == "__main__":
    print(Solution().leastMinutes(2))  # 2
    print(Solution().leastMinutes(4))  # 3

    print(Solution().leastMinutes(1))  # 1
    print(Solution().leastMinutes(5))  # 4
